<template>
  <chilrenVue :user1="user"
              :msg="message"
              ref="chilren"
              @submitFn="parentFn($event)"></chilrenVue>
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue'
import chilrenVue from './components/chilren.vue';
const user = reactive({ name: "zhangsan", age: 10 })
let message = ref("你好");
const chilren = ref();
onMounted(() => {
  console.log("-------------chilren", chilren);
  chilren.value.fn1()
  console.log("------------name:", chilren.value.username);
})

const parentFn = (book) => {
  console.log("--------parentFn--------", book);
}


</script>

<style scoped>
</style>
